package utils;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import common.db.DBUtils;

public class Result_Output {

	public static void display_pet(List<Map<String, Object>> result)
	{		
		System.out.print("id"+'\t');
		System.out.print("name"+'\t');
		System.out.print("kind"+'\t');
		System.out.print("O_name"+'\t');
		System.out.print("S_name"+'\t');
		System.out.print("money"+'\t');
		System.out.print("love"+'\t');
		System.out.println("health"+'\t');
		for (int i = 0; i < result.size(); i++) 
		{
			Map map=result.get(i);
			System.out.print(map.get("id"));
			System.out.print('\t');
			System.out.print(map.get("pname"));
			System.out.print('\t');
			System.out.print(map.get("kind"));
			System.out.print('\t');
			System.out.print(map.get("O_name"));
			System.out.print('\t');
			System.out.print(map.get("S_name"));
			System.out.print('\t');
			System.out.print(map.get("money"));
			System.out.print('\t');
			System.out.print(map.get("love"));
			System.out.print('\t');
			System.out.println(map.get("health"));
			
		}
	}
	public static void display_O_money(List<Map<String, Object>> result) {
		System.out.println("money"+'\t');
		for (int i = 0; i < result.size(); i++) 
		{
			Map map=result.get(i);
			System.out.print(map.get("O_money"));
			System.out.print('\t');
			System.out.print('\n');	
		}
	}
	
	public static void display_S_money(List<Map<String, Object>> result) {
		System.out.println("money"+'\t');
		for (int i = 0; i < result.size(); i++) 
		{
			Map map=result.get(i);
			System.out.print(map.get("S_money"));
			System.out.print('\t');
			System.out.print('\n');	
		}
	}
	
	public static void display_accounts(List<Map<String, Object>> result)
	{
		System.out.print("id"+'\t');
		System.out.print("name"+'\t');
		System.out.print("outname"+'\t');
		System.out.print("inname"+'\t');
		System.out.print("time"+'\t');
		System.out.println("money"+'\t');

		for (int i = 0; i < result.size(); i++) 
		{
			Map map=result.get(i);
			System.out.print(map.get("id"));
			System.out.print('\t');
			System.out.print(map.get("pname"));
			System.out.print('\t');
			System.out.print(map.get("outname"));
			System.out.print('\t');
			System.out.print(map.get("inname"));
			System.out.print('\t');
			System.out.print(map.get("time"));
			System.out.print('\t');
			System.out.println(map.get("money"));
		}
	}
}
